package com.cdh.ucenter.controller;


import com.cdh.ucenter.entity.vo.RegisterVo;
import com.cdh.ucenter.service.MemberService;
import com.cdh.utils.result.Restful;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author cdh
 * @since 2021-03-03
 */
@Api(value = "会员管理")
@RestController
@RequestMapping("/api/ucenter/member")
@CrossOrigin
@Slf4j
public class MemberController {

    @Autowired
    private MemberService memberService;

    @ApiOperation("会员注册")
    @PostMapping("register")
    public Restful register(@RequestBody RegisterVo registerVo){
        memberService.register(registerVo);
        return Restful.ok().message("注册成功");
    }
}

